package com.example.datachange.service;

import com.example.datachange.model.GirlfriendDb;
import com.example.datachange.model.StarsDictionary;
import com.stars.datachange.annotation.ChangeResult;
import org.springframework.stereotype.Service;

@Service
public class StarsService {

    @ChangeResult
    public StarsDictionary getArray() {
        StarsDictionary result = new StarsDictionary();
        StarsDictionary.Dictionary[] dArr = new StarsDictionary.Dictionary[2];
        StarsDictionary.Dictionary d1 = new StarsDictionary.Dictionary();
        d1.setType("3");
        d1.setGalaxy("1");
        StarsDictionary.Dictionary d2 = new StarsDictionary.Dictionary();
        d2.setType("3");
        d2.setGalaxy("2");
        dArr[0] = d1;
        dArr[1] = d2;
        result.setArray(dArr);
        return result;
    }

    @ChangeResult
    public GirlfriendDb girlfriendDb() {
        GirlfriendDb result = new GirlfriendDb();
        result.setName("小红");
        result.setFavoriteFood("20001,20003,20005");
        result.setType(2);
        return result;
    }
}
